Git / GitHub Overview
What is Git?
Git is a version control system that helps you track changes to your code and files. Think of it like a time machine for your robot project - you can save your progress, go back to previous versions, and see what changed.
Why Do We Need Git?
Imagine you're working on a school project:
- Without Git: You might save files like "robot_code_v1.cpp", "robot_code_v2.cpp", "robot_code_final.cpp", "robot_code_final_for_real.cpp" 😱
- With Git: You save your work with meaningful names and can go back to any version instantly 😎
What Git Does for You
- Tracks Changes - Git remembers every change you make to your files
- Saves History - You can see what changed, when it changed, and who changed it
- Enables Undo - Made a mistake? Git lets you go back to when things were working
- Supports Teamwork - Multiple people can work on the same project without overwriting each other's work
What is GitHub?
GitHub is a website that stores your Git repositories online. Think of it like Google Drive or Dropbox, but specifically designed for code and made to work perfectly with Git.
Why Do We Use GitHub?
- Cloud Backup - Your code is safely stored online, even if your computer breaks
- Team Collaboration - Everyone on the team can access and work on the code
- Code Sharing - Easy to show your work to mentors and teammates
- Code Review - Team members can review and suggest improvements to your code
How Git and GitHub Work Together
Your Computer (Git) ←→ GitHub (Online Storage)
Local Work Team Collaboration
- You write code on your computer
- Git tracks your changes locally
- You "push" your changes to GitHub
- Your team can see and use your code
- You can "pull" their changes back to your computer
Key Concepts
Repository (Repo)
A repository is like a special folder that contains your project and its complete history. It's where all your robot code lives.
Learn more about repositories →
Commit
A commit is like a checkpoint in a video game. It saves the current state of your work so you can always come back to it.
Push
Pushing uploads your local changes to GitHub so your team can see them.
Learn more about pushing changes →
Pull
Pulling downloads changes from GitHub to your computer so you have the latest code.
Learn more about pulling changes →
Branch
A branch is like a parallel version of your code where you can experiment without affecting the main code.
Issues
An issue is like a task card that describes something that needs to be done on your robot project. Issues help your team organize work, track progress, and communicate about what needs to be built.